﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Work.BL.Managers;
using Work.UI.Web.Forms.Code.Common;

namespace Work.UI.Web.Forms.Admin.Region
{
    public partial class Edit : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void odsRegion_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
        {
            IRegionManager regionManager = IoCContainer.ServiceLocator.Resolve<IRegionManager>();
            e.ObjectInstance = regionManager;
        }

        protected void frvRegion_ItemUpdate(object sender, FormViewUpdatedEventArgs e)
        {
            Response.Redirect("~/Admin/Region/Regions.aspx");
        }

        protected void AddRegion_Click(object sender, EventArgs e)
        {
            frvRegion.UpdateItem(true);
        }

        protected void Cansel_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/Admin/Region/Regions.aspx");
        }
    }
}